package com.wulis.seckill.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wulis.seckill.business.pojo.SeckillGoodsInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 秒杀商品mapper
 */
@Mapper
public interface SeckillGoodsInfoMapper extends BaseMapper<SeckillGoodsInfo> {
    /**
     * 秒杀商品减少库存z
     * @param goodsId
     * @param version
     * @return
     */
    int reduceStock(@Param("goodsId") long goodsId, @Param("version") int version);
}
